""""these are color vectors converted from hex color codes, used for coloring bodies in subdomains. This removes the dependecy from the colorsys module as, we had issues with the same when running MPI tests in the pipeline """
from yade.minieigenHP import Vector3

#128 colors!

col = [
        Vector3(0, 0, 0),
        Vector3(1, 1, 0),
        Vector3(0.10980392156862745, 0.9019607843137255, 1),
        Vector3(1, 0.20392156862745098, 1),
        Vector3(1, 0.2901960784313726, 0.27450980392156865),
        Vector3(0, 0.5372549019607843, 0.2549019607843137),
        Vector3(0, 0.43529411764705883, 0.6509803921568628),
        Vector3(0.6392156862745098, 0, 0.34901960784313724),
        Vector3(1, 0.8588235294117647, 0.8980392156862745),
        Vector3(0.47843137254901963, 0.28627450980392155, 0),
        Vector3(0, 0, 0.6509803921568628),
        Vector3(0.38823529411764707, 1, 0.6745098039215687),
        Vector3(0.7176470588235294, 0.592156862745098, 0.3843137254901961),
        Vector3(0, 0.30196078431372547, 0.2627450980392157),
        Vector3(0.5607843137254902, 0.6901960784313725, 1),
        Vector3(0.6, 0.49019607843137253, 0.5294117647058824),
        Vector3(0.35294117647058826, 0, 0.027450980392156862),
        Vector3(0.5019607843137255, 0.5882352941176471, 0.5764705882352941),
        Vector3(0.996078431372549, 1, 0.9019607843137255),
        Vector3(0.10588235294117647, 0.26666666666666666, 0),
        Vector3(0.30980392156862746, 0.7764705882352941, 0.00392156862745098),
        Vector3(0.23137254901960785, 0.36470588235294116, 1),
        Vector3(0.2901960784313726, 0.23137254901960785, 0.3254901960784314),
        Vector3(1, 0.1843137254901961, 0.5019607843137255),
        Vector3(0.3803921568627451, 0.3803921568627451, 0.35294117647058826),
        Vector3(0.7294117647058823, 0.03529411764705882, 0),
        Vector3(0.4196078431372549, 0.4745098039215686, 0),
        Vector3(0, 0.7607843137254902, 0.6274509803921569),
        Vector3(1, 0.6666666666666666, 0.5725490196078431),
        Vector3(1, 0.5647058823529412, 0.788235294117647),
        Vector3(0.7254901960784313, 0.011764705882352941, 0.6666666666666666),
        Vector3(0.8196078431372549, 0.3803921568627451, 0),
        Vector3(0.8666666666666667, 0.9372549019607843, 1),
        Vector3(0, 0, 0.20784313725490197),
        Vector3(0.4823529411764706, 0.30980392156862746, 0.29411764705882354),
        Vector3(0.6313725490196078, 0.7607843137254902, 0.6),
        Vector3(0.18823529411764706, 0, 0.09411764705882353),
        Vector3(0.0392156862745098, 0.6509803921568628, 0.8470588235294118),
        Vector3(0.00392156862745098, 0.2, 0.28627450980392155),
        Vector3(0, 0.5176470588235295, 0.43529411764705883),
        Vector3(0.21568627450980393, 0.12941176470588237, 0.00392156862745098),
        Vector3(1, 0.7098039215686275, 0),
        Vector3(0.7607843137254902, 1, 0.9294117647058824),
        Vector3(0.6274509803921569, 0.4745098039215686, 0.7490196078431373),
        Vector3(0.8, 0.027450980392156862, 0.26666666666666666),
        Vector3(0.7529411764705882, 0.7254901960784313, 0.6980392156862745),
        Vector3(0.7607843137254902, 1, 0.6),
        Vector3(0, 0.11764705882352941, 0.03529411764705882),
        Vector3(0, 0.2823529411764706, 0.611764705882353),
        Vector3(0.43529411764705883, 0, 0.3843137254901961),
        Vector3(0.047058823529411764, 0.7411764705882353, 0.4),
        Vector3(0.9333333333333333, 0.7647058823529411, 1),
        Vector3(0.27058823529411763, 0.42745098039215684, 0.4588235294117647),
        Vector3(0.7176470588235294, 0.4823529411764706, 0.40784313725490196),
        Vector3(0.47843137254901963, 0.5294117647058824, 0.6313725490196078),
        Vector3(0.47058823529411764, 0.5529411764705883, 0.4),
        Vector3(0.5333333333333333, 0.3333333333333333, 0.47058823529411764),
        Vector3(0.9803921568627451, 0.8156862745098039, 0.6235294117647059),
        Vector3(1, 0.5411764705882353, 0.6039215686274509),
        Vector3(0.8196078431372549, 0.3411764705882353, 0.6274509803921569),
        Vector3(0.7450980392156863, 0.7686274509803922, 0.34901960784313724),
        Vector3(0.27058823529411763, 0.4, 0.2823529411764706),
        Vector3(0, 0.5254901960784314, 0.9294117647058824),
        Vector3(0.5333333333333333, 0.43529411764705883, 0.2980392156862745),
        Vector3(0.20392156862745098, 0.21176470588235294, 0.17647058823529413),
        Vector3(0.7058823529411765, 0.6588235294117647, 0.7411764705882353),
        Vector3(0, 0.6509803921568628, 0.6666666666666666),
        Vector3(0.27058823529411763, 0.17254901960784313, 0.17254901960784313),
        Vector3(0.38823529411764707, 0.38823529411764707, 0.4588235294117647),
        Vector3(0.6392156862745098, 0.7843137254901961, 0.788235294117647),
        Vector3(1, 0.5686274509803921, 0.24705882352941178),
        Vector3(0.5764705882352941, 0.5411764705882353, 0.5058823529411764),
        Vector3(0.3411764705882353, 0.3254901960784314, 0.1607843137254902),
        Vector3(0, 0.996078431372549, 0.8117647058823529),
        Vector3(0.6901960784313725, 0.3568627450980392, 0.43529411764705883),
        Vector3(0.5490196078431373, 0.8156862745098039, 1),
        Vector3(0.23137254901960785, 0.592156862745098, 0),
        Vector3(0.01568627450980392, 0.9686274509803922, 0.3411764705882353),
        Vector3(0.7843137254901961, 0.6313725490196078, 0.6313725490196078),
        Vector3(0.11764705882352941, 0.43137254901960786, 0),
        Vector3(0.4745098039215686, 0, 0.8431372549019608),
        Vector3(0.6549019607843137, 0.4588235294117647, 0),
        Vector3(0.38823529411764707, 0.403921568627451, 0.6627450980392157),
        Vector3(0.6274509803921569, 0.34509803921568627, 0.21568627450980393),
        Vector3(0.4196078431372549, 0, 0.17254901960784313),
        Vector3(0.4666666666666667, 0.14901960784313725, 0),
        Vector3(0.8431372549019608, 0.5647058823529412, 1),
        Vector3(0.6078431372549019, 0.592156862745098, 0),
        Vector3(0.32941176470588235, 0.6196078431372549, 0.4745098039215686),
        Vector3(1, 0.9647058823529412, 0.6235294117647059),
        Vector3(0.12549019607843137, 0.08627450980392157, 0.1450980392156863),
        Vector3(0.4470588235294118, 0.2549019607843137, 0.5607843137254902),
        Vector3(0.7372549019607844, 0.13725490196078433, 1),
        Vector3(0.6, 0.6784313725490196, 0.7529411764705882),
        Vector3(0.22745098039215686, 0.1411764705882353, 0.396078431372549),
        Vector3(0.5725490196078431, 0.13725490196078433, 0.1607843137254902),
        Vector3(0.3568627450980392, 0.27058823529411763, 0.20392156862745098),
        Vector3(0.9921568627450981, 0.9098039215686274, 0.8627450980392157),
        Vector3(0.25098039215686274, 0.3058823529411765, 0.3333333333333333),
        Vector3(0, 0.5372549019607843, 0.6392156862745098),
        Vector3(0.796078431372549, 0.49411764705882355, 0.596078431372549),
        Vector3(0.6431372549019608, 0.9098039215686274, 0.01568627450980392),
        Vector3(0.19607843137254902, 0.3058823529411765, 0.4470588235294118),
        Vector3(0.41568627450980394, 0.22745098039215686, 0.2980392156862745),
        Vector3(0.5137254901960784, 0.6705882352941176, 0.34509803921568627),
        Vector3(0, 0.10980392156862745, 0.11764705882352941),
        Vector3(0.8196078431372549, 0.9686274509803922, 0.807843137254902),
        Vector3(0, 0.29411764705882354, 0.1568627450980392),
        Vector3(0.7843137254901961, 0.8156862745098039, 0.9647058823529412),
        Vector3(0.6392156862745098, 0.6431372549019608, 0.5372549019607843),
        Vector3(0.5019607843137255, 0.4235294117647059, 0.4),
        Vector3(0.13333333333333333, 0.1568627450980392, 0),
        Vector3(0.7490196078431373, 0.33725490196078434, 0.3137254901960784),
        Vector3(0.9098039215686274, 0.18823529411764706, 0),
        Vector3(0.4, 0.4745098039215686, 0.42745098039215684),
        Vector3(0.8549019607843137, 0, 0.48627450980392156),
        Vector3(1, 0.10196078431372549, 0.34901960784313724),
        Vector3(0.5411764705882353, 0.8588235294117647, 0.7058823529411765),
        Vector3(0.11764705882352941, 0.00784313725490196, 0),
        Vector3(0.3568627450980392, 0.3058823529411765, 0.3176470588235294),
        Vector3(0.7843137254901961, 0.5843137254901961, 0.7725490196078432),
        Vector3(0.19607843137254902, 0, 0.2),
        Vector3(1, 0.40784313725490196, 0.19607843137254902),
        Vector3(0.4, 0.8823529411764706, 0.8274509803921568),
        Vector3(0.8117647058823529, 0.803921568627451, 0.6745098039215687),
        Vector3(0.8156862745098039, 0.6745098039215687, 0.5803921568627451),
        Vector3(0.49411764705882355, 0.8274509803921568, 0.4745098039215686),
        Vector3(0.00392156862745098, 0.17254901960784313, 0.34509803921568627)
]


def getCol(num):
	if num > len(col):
		diff = num - len(col)
		return col + col[:diff]
	else:
		return col[-num:]
